/* 卡片视图模式样式 */

/* 分享导航卡片模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--card-shadow);
  position: relative;
}

.modal-content h2 {
  margin: 0 0 1.5rem 0;
  color: var(--text-color);
  font-size: 1.5rem;
}

.share-tool-info {
  margin-bottom: 1.5rem;
}

.share-tool-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.share-tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
}

.share-tool-title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-color);
}

.share-tool-description {
  margin: 0.5rem 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

#share-tool-category {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--green);
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}
#share-tool-url {
    color: #007bff;
}

.share-tool-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* 悬浮切换按钮 */
.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.floating-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.floating-btn .icon {
    width: 24px;
    height: 24px;
}

.card-top {
    display: flex;
    align-items: center;
}



/* Tools Grid */
.tools-section {
    margin-top: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.tool-category-group {
    display: contents;
}

.tool-card {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--card-bg);
    padding: 1rem;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    box-shadow: var(--card-shadow);
}

.tool-card:hover {
    border-color: var(--gray-300);
    background-color: var(--card-hover);
    transform: translateY(-2px);
}

.status-indicator {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.green {
    background-color: var(--green);
}

.status-indicator.red {
    background-color: var(--red);
}

.tool-right {
    width: 75%;
}
.tool-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tool-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: var(--gray-200);
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon-img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
}

.tool-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-900);
}

.tool-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.tool-like {
    position: fixed;
    right: 0;
    top: 1.5rem;

}

.tool-status.green {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--green);
}

.tool-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0.3rem;
    width: 90%;
}

.tool-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.stat {
    display: flex;
    align-items: center;
}

.stat .icon {
    margin-right: 0.25rem;
}

.tool-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-category {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.tool-content {
    min-height: 52px;
    margin-bottom: 0.5rem;
}

.compact-view .tool-content {
    padding-right: 2rem;
    min-height: 42px;
}

/* 缩略模式样式 */
.compact-view .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.75rem;
}

.compact-view .tool-card {
    padding: 0.75rem;
    display: relative;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.compact-view .compact-stat {
    padding-right: 0.2rem;
    font-size: 0.85rem;
}

.compact-tools-view {
    display: none;
}

.compact-view .compact-tools-view {
    display: flex;
    flex-direction: row;
    position: fixed;
    bottom: 0.25rem;
    right: 5.2rem;
}

.compact-view .tool-header {
    flex-direction: row;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-view .tool-icon {
    margin-right: 0.75rem;
    margin-bottom: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--gray-200);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.compact-view .tool-status {
    display: none;
}

.compact-view .tool-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.compact-view .tool-title {
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-view .tool-description {
    display: block;
    font-size: 0.8rem;
    color: --var(--gray-700);
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-view .tool-footer {
    margin-top: 0.5rem;
    width: 100%;
    display: none;
    justify-content: space-between;
    align-items: center;
}

.compact-view .tool-icon-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.compact-view .tool-stats {
    justify-content: flex-start;
    gap: 0.5rem;
}

.compact-view .tool-category {
    position: static;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    display: inline-block;
    margin-top: 0.25rem;
    background-color: #f0f0f0;
}

/* 点赞按钮样式 */
.compact-view .btn.like-btn {
    position: fixed;
    bottom: -0.25rem;
    right: 3rem;
    padding: 0.25rem;
    background: transparent;
}

/* 动画效果 */
.tools-grid {
    transition: all 0.3s ease;
}

.tool-card {
    transition: all 0.3s ease;
}

.to_website {
    text-decoration: none;
    color: rgb(41, 39, 39);
    font-size: 0.8rem;
}

.to_website:hover {
    color: #007bff;
}

.edit-tool-btn {
    cursor: pointer;
    text-decoration: none;
    color: rgb(41, 39, 39);
    font-size: 0.8rem;
}

.edit-tool-btn:hover {
    color: #ff5e00;
}

.fav-tool-card {
    max-width: 150px;
    padding: 0.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.fav-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.fav-tool-card-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--foreground);
}

.fav-tool-icon-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.tool-share {
    position: fixed;
    right: 0rem;
    top: 4rem;
}

/* .share-btn {
    position: fixed;
    right: 0rem;
    top: 4rem;
} */

.compact-view .btn.share-btn {
    position: fixed;
    bottom: -0.25rem;
    right: 1rem;
    top: none;
    background: transparent;
}